package top.huntwolf.admin.pojo.orderEntity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import top.huntwolf.admin.common.enums.EnumValue;
import top.huntwolf.admin.common.enums.OrderStatus;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class OrderStatusVo {

    private String orderId;

    private OrderStatus orderStatus;

    public void setOrderStatus(Object orderStatus){
        if (orderStatus instanceof OrderStatus){
            this.orderStatus = (OrderStatus) orderStatus;
        }else{
            this.orderStatus = EnumValue.valueOf(OrderStatus.class,orderStatus);
        }
    }
}
